package com.ulook.lookplanet.mapper;

import com.ulook.lookplanet.bean.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 描述：
 *
 * @author L1998
 * @date 2021/4/16
 */
@Mapper
@Repository
public interface ArticleMapper {

    List<TArtPic> getArtPic(String artid);

    void like(TLikes likes);
    void cancelLike(TLikes likes);
    int hasRecordLike(TLikes likes);

    void collect(TCollect collect);
    void cancelCollect(TCollect collect);
    int hasRecordCollect(TCollect collect);

    void addView(int userid, String artid);

    VArtCount getArtCount(String artid);

    void comment(TComment comment);

    VCommentInfo getCommentByUid(String uid);

    List<VCommentInfo> getComment(String artid, int itemNum);

    List<TTopic> getTopicByArtId(String artid);

    List<VArticlePreInfo> searchArt(String s, int userid, int itemNum);
}
